package cn.pn.project.client.schedule;

import cn.pn.project.client.schedule.follback.SeatFallBack;
import cn.pn.project.pojo.schedule.Seat;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.sql.SQLException;
import java.util.List;

@FeignClient(name="pn-scheduler-provider",fallback = SeatFallBack.class)

public interface RestSeatClient {
    /**
     * 根据场地id查询座位信息
     * @param placeId
     * @return
     * @throws SQLException
     */
    @RequestMapping(value = "/getSeatByPlaceId",method = RequestMethod.POST)
    public Object getSeatByPlaceId(@RequestParam("placeId") Integer placeId) throws SQLException;


    /**
     * 根据座位id查询座位信息，多个座位id用，隔开
     * @param seatId
     * @return
     * @throws SQLException
     */
    @RequestMapping(value = "getAllSeatInfo",method = RequestMethod.POST)
    public List<Seat> getAllSeatInfo(@RequestParam("seatId") String seatId) throws SQLException;
}
